package com.kucai.yifaqapp.ui.activity;

import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.kucai.yifaqapp.presenter.activity.BaseActivityPresenter;
import com.kucai.yifaqapp.ui.view.IBaseView;

import javax.inject.Inject;

/**
 * Created by Administrator on 2017/8/4.
 * Activity基类
 * 绑定Presenter
 */

public abstract class BaseActivity<T extends BaseActivityPresenter> extends BaseActivitySimple implements IBaseView {
    @Inject
    public T mPresenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setBackgroundDrawable(null);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        initDagger();
    }

    /**
     * 初始化Dagger
     */
    protected abstract void initDagger();
}
